package com.motionlog.activity;

import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

import com.motionlog.R;

public class MotionStatistic extends TabActivity {

	private static final String TAG = null;
	TabHost tabHost;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.motion_static);

		tabHost = (TabHost) findViewById(android.R.id.tabhost);
		tabHost.setup();

		TabHost.TabSpec spec;
		Intent intent;

		intent = new Intent(this, StatisticDiagram.class);
		spec = tabHost.newTabSpec("diagram").setIndicator("图表")
				.setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent(this, StatisticDate.class);
		intent.putExtra("week", 2);
		spec = tabHost.newTabSpec("two-week").setIndicator("两周")
				.setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent(this, StatisticDate.class);
		intent.putExtra("week", 4);
		spec = tabHost.newTabSpec("four-week").setIndicator("四周")
				.setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent(this, StatisticDate.class);
		// 半年26周
		intent.putExtra("week", 26);
		spec = tabHost.newTabSpec("half-year").setIndicator("半年")
				.setContent(intent);
		tabHost.addTab(spec);
	}

	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		android.util.Log.d(TAG, "on");
	}
}
